<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="box"></div>
    <script>
        var box = document.getElementById("box");
        var food = ["火锅", "烧烤", "炸鸡", "烤鱼", "米线", "麻辣烫", "面包"];
        var ul = document.createElement("ul");
        box.appendChild(ul);
        for (var i = 0; i < food.length; i++) {
            var li = document.createElement("li");
            ul.appendChild(li);
        }
        var lis = ul.children;
        for (var i = 0; i < lis.length; i++) {
            lis[i].innerText = food[i];
        }
    </script>
</body>

</html>